home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.sept.archive / 000004_crash!cup.port….com!Politikill_Wed, 1 Sep 93 09:12:25 PST.msg < prev    next >
Text File  |  1993-11-02  |  4KB  |  139 lines

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Wed, 1 Sep 93 09:12:25 PST
  3. Received: from nova.unix.portal.com by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0oXgL3-0000vEC; Tue, 31 Aug 93 17:46 PDT
  5. Received: by nova.unix.portal.com (5.65b/4.1 1.425) 
  6.     id AA14677; Tue, 31 Aug 93 17:50:24 -0700
  7. Received: from hobo  by portal.unix.portal.com (1.734) 
  8.     id AA27036; Tue, 31 Aug 93 17:50:22 -0700
  9. Received: by hobo.corp.portal.com (4.1/4.0.3 1.74) 
  10.     id AA03684; Tue, 31 Aug 93 17:50:21 PDT
  11. Return-Path: <Politikill@cup.portal.com>
  12. Lines: 120
  13. Date: Tue, 31 Aug 93 17:50:20 PDT
  14. Message-Id: <9308311750.1.25589@cup.portal.com>
  15. X-Origin: The Portal System (TM)
  16. From: Politikill@cup.portal.com
  17. To: AmigaE@bkhouse.cts.com
  18. Subject: Re: E Guru!
  19.  
  20. [Whole Process being echo'd for the good of the community :-) ]
  21.  
  22. =============================================================================
  23.  
  24. /* getprogramicon()
  25.  *
  26.  * This fun little proc is supposed to return a diskobject so you can play
  27.  * with the ToolTypes.  It expects a WBPROJECT icon first, then a WBTOOL
  28.  * icon next.  It locks the icon's directory, unlocking it when it's done.
  29.  * All-in-all, pretty cool.  Mostly based on Term's icon handling, but
  30.  * heavily modified to fit in with my own nefarious purposes (brew ha ha).
  31.  */
  32.  
  33. PROC getprogramicon(wbmessage)
  34.  DEF diskob:PTR TO diskobject,tmp:PTR TO wbarg,newlock,
  35.  wbmsg:PTR TO wbstartup
  36.  diskob:=0; wbmsg:=0
  37.  IF wbmessage
  38.   wbmsg:=wbmessage
  39.   IF tmp:=wbmsg.arglist
  40.    IF tmp.name++
  41.     newlock:=CurrentDir(tmp.lock)         /* set the current directory to */
  42.     IF diskob:=GetDiskObjectNew(tmp.name) /* the icon's directory, to read */
  43.      IF diskob.type<>WBPROJECT            /* the icon's tooltypes. */
  44.       FreeDiskObject(diskob)
  45.       diskob:=NIL
  46.      ENDIF
  47.     ELSE
  48.      UnLock(tmp.lock)
  49.     ENDIF
  50.     IF diskob=NIL
  51.       /* Move to the directory the
  52.        * program was run from.
  53.        */
  54.      tmp.name--
  55.      newlock:=CurrentDir(tmp.lock)
  56.      IF diskob:=GetDiskObjectNew(tmp.name)
  57.       IF diskob.type <> WBTOOL
  58.        FreeDiskObject(diskob)
  59.        diskob:=NIL
  60.       ENDIF
  61.      ELSE
  62.       UnLock(tmp.lock)
  63.      ENDIF
  64.  
  65.      IF diskob=0
  66.       IF diskob:=GetDiskObjectNew('quip')
  67.        IF diskob.type<>WBTOOL
  68.         FreeDiskObject(diskob)
  69.         diskob := NIL
  70.        ENDIF
  71.       ENDIF
  72.      ENDIF
  73.     ENDIF
  74.    ENDIF
  75.   ENDIF
  76.  ENDIF
  77.  
  78.   /* Still no success. */
  79.  
  80.  IF diskob=0
  81.    /* Use the default names. */
  82.   IF diskob:=GetDiskObjectNew('Quip')
  83.    IF diskob.type<>WBTOOL
  84.     FreeDiskObject(diskob)
  85.     diskob := NIL
  86.    ENDIF
  87.   ENDIF
  88.  
  89.   IF diskob=0
  90.    IF diskob:=GetDiskObjectNew('PROGDIR:Quip')
  91.     IF diskob.type<>WBTOOL
  92.      FreeDiskObject(diskob)
  93.      diskob := NIL
  94.     ENDIF
  95.    ENDIF
  96.   ENDIF
  97.  ENDIF
  98. ENDPROC diskob
  99.  
  100. ===============================================================================
  101.  
  102.  
  103. >You may want to forward this to the rest of the group.  This icon routine
  104.     [I just did :-)]
  105. >definately works (it won't leave locks, like MANY icon routines I've seen).  I
  106. t
  107.  
  108.     I thought that locks from workbench WERE NOT supposed to be released. 
  109.  
  110. >may also need to be cleaned up (particularly the last bit, as I'm not entirely
  111. >sure what it's supposed to be doing there).
  112.  
  113.     What, PROGDIR: ?  That's a nifty little thing that works like an assign
  114. to the directory the program was launched from. (OR the current dir from
  115. Shell) That's what I'm using for now...until I decide to put in the above.
  116. It works, lets me assign tooltypes, and get them. 
  117.  
  118. >I'll be releasing all the source code to Quip (with it's many wonderful, usefu
  119. l
  120. >routines and bugs) very shortly.
  121.  
  122.     I haven't yet decided wheter I'm going to release my source code yet.  I
  123. may require people who want it to give me a phone call. (I figure everyone
  124. can spend $1 to talk with the author, and find out all the little
  125. idiosyncrosies (sp) before they go delving into it. I don't really want to
  126. let the source out in Europe, cause there could be some mutation of it going
  127. around and I'de never see it :-)   Oh well...
  128.  
  129.  / / /
  130. /_/_/iZ
  131.  
  132. MODULE 'WiZkId'
  133. PROC main()
  134.   wizkid.inetaddress:='Politikill@cup.portal.com'
  135.   wizkid.realname:='Jeffrey J Peden ]['
  136. ENDPROC
  137.  
  138. *-- GammaTag Version 2.8 --*
  139. *-- Judicial reform is no sport for the short-winded.